﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="RiskLibSampleDataSet" targetNamespace="http://tempuri.org/RiskLibSampleDataSet.xsd" xmlns:mstns="http://tempuri.org/RiskLibSampleDataSet.xsd" xmlns="http://tempuri.org/RiskLibSampleDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="RiskLibSampleConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="RiskLibSampleConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.DataSourceExample.Properties.Settings.GlobalReference.Default.RiskLibSampleConnectionString" Provider="Microsoft.SqlServerCe.Client.3.5" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="HistoricalTableAdapter" GeneratorDataComponentClassName="HistoricalTableAdapter" Name="Historical" UserDataComponentName="HistoricalTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="RiskLibSampleConnectionString (Settings)" DbObjectName="Historical" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [Historical] WHERE (([ProductCode] = @p1) AND ([DataDate] = @p2))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDate" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [Historical] ([ProductCode], [DataDate], [OpenPrice], [HighPrice], [LowPrice], [ClosePrice], [Volume], [AdjClose]) VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDate" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p3" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="OpenPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p4" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="HighPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p5" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="LowPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p6" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="ClosePrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p7" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="Volume" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p8" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="AdjClose" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT [ProductCode], [DataDate], [OpenPrice], [HighPrice], [LowPrice], [ClosePrice], [Volume], [AdjClose] FROM [Historical]</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [Historical] SET [ProductCode] = @p1, [DataDate] = @p2, [OpenPrice] = @p3, [HighPrice] = @p4, [LowPrice] = @p5, [ClosePrice] = @p6, [Volume] = @p7, [AdjClose] = @p8 WHERE (([ProductCode] = @p9) AND ([DataDate] = @p10))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDate" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p3" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="OpenPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p4" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="HighPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p5" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="LowPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p6" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="ClosePrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p7" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="Volume" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p8" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="AdjClose" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p9" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@p10" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDate" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ProductCode" DataSetColumn="ProductCode" />
              <Mapping SourceColumn="DataDate" DataSetColumn="DataDate" />
              <Mapping SourceColumn="OpenPrice" DataSetColumn="OpenPrice" />
              <Mapping SourceColumn="HighPrice" DataSetColumn="HighPrice" />
              <Mapping SourceColumn="LowPrice" DataSetColumn="LowPrice" />
              <Mapping SourceColumn="ClosePrice" DataSetColumn="ClosePrice" />
              <Mapping SourceColumn="Volume" DataSetColumn="Volume" />
              <Mapping SourceColumn="AdjClose" DataSetColumn="AdjClose" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ProductTableAdapter" GeneratorDataComponentClassName="ProductTableAdapter" Name="Product" UserDataComponentName="ProductTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="RiskLibSampleConnectionString (Settings)" DbObjectName="Product" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [Product] WHERE (([ProductCode] = @p1))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [Product] ([ProductCode], [ProductName], [Exchange]) VALUES (@p1, @p2, @p3)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductName" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p3" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Exchange" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT [ProductCode], [ProductName], [Exchange] FROM [Product]</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [Product] SET [ProductCode] = @p1, [ProductName] = @p2, [Exchange] = @p3 WHERE (([ProductCode] = @p4))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductName" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p3" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Exchange" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p4" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ProductCode" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ProductCode" DataSetColumn="ProductCode" />
              <Mapping SourceColumn="ProductName" DataSetColumn="ProductName" />
              <Mapping SourceColumn="Exchange" DataSetColumn="Exchange" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="RiskLibSampleDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="RiskLibSampleDataSet" msprop:Generator_UserDSName="RiskLibSampleDataSet" msprop:EnableTableAdapterManager="True">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Historical" msprop:Generator_UserTableName="Historical" msprop:Generator_RowDeletedName="HistoricalRowDeleted" msprop:Generator_TableClassName="HistoricalDataTable" msprop:Generator_RowChangedName="HistoricalRowChanged" msprop:Generator_RowClassName="HistoricalRow" msprop:Generator_RowChangingName="HistoricalRowChanging" msprop:Generator_RowEvArgName="HistoricalRowChangeEvent" msprop:Generator_RowEvHandlerName="HistoricalRowChangeEventHandler" msprop:Generator_TablePropName="Historical" msprop:Generator_TableVarName="tableHistorical" msprop:Generator_RowDeletingName="HistoricalRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ProductCode" msprop:Generator_UserColumnName="ProductCode" msprop:Generator_ColumnPropNameInRow="ProductCode" msprop:Generator_ColumnVarNameInTable="columnProductCode" msprop:Generator_ColumnPropNameInTable="ProductCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DataDate" msprop:Generator_UserColumnName="DataDate" msprop:Generator_ColumnPropNameInRow="DataDate" msprop:Generator_ColumnVarNameInTable="columnDataDate" msprop:Generator_ColumnPropNameInTable="DataDateColumn" type="xs:dateTime" />
              <xs:element name="OpenPrice" msprop:Generator_UserColumnName="OpenPrice" msprop:Generator_ColumnPropNameInRow="OpenPrice" msprop:Generator_ColumnVarNameInTable="columnOpenPrice" msprop:Generator_ColumnPropNameInTable="OpenPriceColumn" type="xs:double" minOccurs="0" />
              <xs:element name="HighPrice" msprop:Generator_UserColumnName="HighPrice" msprop:Generator_ColumnPropNameInRow="HighPrice" msprop:Generator_ColumnVarNameInTable="columnHighPrice" msprop:Generator_ColumnPropNameInTable="HighPriceColumn" type="xs:double" minOccurs="0" />
              <xs:element name="LowPrice" msprop:Generator_UserColumnName="LowPrice" msprop:Generator_ColumnPropNameInRow="LowPrice" msprop:Generator_ColumnVarNameInTable="columnLowPrice" msprop:Generator_ColumnPropNameInTable="LowPriceColumn" type="xs:double" minOccurs="0" />
              <xs:element name="ClosePrice" msprop:Generator_UserColumnName="ClosePrice" msprop:Generator_ColumnPropNameInRow="ClosePrice" msprop:Generator_ColumnVarNameInTable="columnClosePrice" msprop:Generator_ColumnPropNameInTable="ClosePriceColumn" type="xs:double" />
              <xs:element name="Volume" msprop:Generator_UserColumnName="Volume" msprop:Generator_ColumnPropNameInRow="Volume" msprop:Generator_ColumnVarNameInTable="columnVolume" msprop:Generator_ColumnPropNameInTable="VolumeColumn" type="xs:double" minOccurs="0" />
              <xs:element name="AdjClose" msprop:Generator_UserColumnName="AdjClose" msprop:Generator_ColumnPropNameInRow="AdjClose" msprop:Generator_ColumnVarNameInTable="columnAdjClose" msprop:Generator_ColumnPropNameInTable="AdjCloseColumn" type="xs:double" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Product" msprop:Generator_UserTableName="Product" msprop:Generator_RowDeletedName="ProductRowDeleted" msprop:Generator_TableClassName="ProductDataTable" msprop:Generator_RowChangedName="ProductRowChanged" msprop:Generator_RowClassName="ProductRow" msprop:Generator_RowChangingName="ProductRowChanging" msprop:Generator_RowEvArgName="ProductRowChangeEvent" msprop:Generator_RowEvHandlerName="ProductRowChangeEventHandler" msprop:Generator_TablePropName="Product" msprop:Generator_TableVarName="tableProduct" msprop:Generator_RowDeletingName="ProductRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ProductCode" msprop:Generator_UserColumnName="ProductCode" msprop:Generator_ColumnPropNameInRow="ProductCode" msprop:Generator_ColumnVarNameInTable="columnProductCode" msprop:Generator_ColumnPropNameInTable="ProductCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ProductName" msprop:Generator_UserColumnName="ProductName" msprop:Generator_ColumnPropNameInRow="ProductName" msprop:Generator_ColumnVarNameInTable="columnProductName" msprop:Generator_ColumnPropNameInTable="ProductNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Exchange" msprop:Generator_UserColumnName="Exchange" msprop:Generator_ColumnPropNameInRow="Exchange" msprop:Generator_ColumnVarNameInTable="columnExchange" msprop:Generator_ColumnPropNameInTable="ExchangeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="4" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Historical" />
      <xs:field xpath="mstns:ProductCode" />
      <xs:field xpath="mstns:DataDate" />
    </xs:unique>
    <xs:unique name="Product_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Product" />
      <xs:field xpath="mstns:ProductCode" />
    </xs:unique>
  </xs:element>
</xs:schema>